package com.swanclouds.redfish.managers;

import com.google.common.base.Preconditions;
import com.swanclouds.api.managers.LldpService;
import com.swanclouds.core.transport.ClientConstants;
import com.swanclouds.redfish.internal.BaseManagerService;
import com.swanclouds.redfish.managers.domain.LldPServiceModel;

/**
 * @author 李文强
 * description
 */

public class LldPServiceImpl extends BaseManagerService implements LldpService {

    @Override
    public LldPServiceModel get() {
        return get(LldPServiceModel.class, uri(ClientConstants.PATH_MANAGERS_LLDPSERVICE, getManagerId())).execute();
    }

    @Override
    public LldPServiceModel updateLldpService(LldPServiceModel lldPServiceModel) {
        Preconditions.checkNotNull(lldPServiceModel.getLldpEnabled(),"lldpEnabled is null");
        patch(LldPServiceModel.class,uri(ClientConstants.PATH_MANAGERS_LLDPSERVICE, getManagerId())).entity(lldPServiceModel).execute();
        return null;
    }
}
